package com.example.mypro;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

@SuppressWarnings("deprecation")
public class JiaoshiActivity extends TabActivity {
	private TabHost tabHost;
	private Intent intent1;
	private Intent intent2;
	private Intent intent3;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_classroom);
		intent1 = new Intent(JiaoshiActivity.this, BoWenActivity.class);
		intent2 = new Intent(JiaoshiActivity.this, YiFuActivity.class);
		intent3 = new Intent(JiaoshiActivity.this, KeJiActivity.class);
		tabHost = getTabHost();
		tabHost.addTab(tabHost.newTabSpec("博文楼").setContent(intent1)
				.setIndicator("博文楼"));
		tabHost.addTab(tabHost.newTabSpec("逸夫楼").setContent(intent2)
				.setIndicator("逸夫楼"));
		tabHost.addTab(tabHost.newTabSpec("科技楼").setContent(intent3)
				.setIndicator("科技楼"));
		tabHost.setCurrentTab(0);
	}
}
